<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>表单删行</title>
</head>
<script type="text/javascript">
	window.onload = function  () {
		del = document.getElementsByClassName('del');
		for (var i = 0; i < del.length; i++) {
				run(i)
		};
		function run (x) {
			del[x].onclick = function  (){
				del[x].parentNode.parentNode.style.display="none";
			}
			
		}
	}	
</script>
<body>
	<table border="1">
		<tr>
			<td>姓名</td>
			<td>性别</td>
			<td>年龄</td>
			<td>操作</td>
		</tr>
		<tr>
			<td>1</td>
			<td></td>
			<td></td>
			<td><input class='del' type="button" value="删除"><input class='del' type="button" value="修改"></td>
		</tr>
		<tr>
			<td>2</td>
			<td></td>
			<td></td>
			<td><input class='del' type="button" value="删除"><input class='del' type="button" value="修改"></td>
		</tr>
		<tr>
			<td>3</td>
			<td></td>
			<td></td>
			<td><input class='del' type="button" value="删除"><input class='del' type="button" value="修改"></td>
		</tr>
		<tr>
			<td>4</td>
			<td></td>
			<td></td>
			<td><input class='del' type="button" value="删除"><input class='del' type="button" value="修改"></td>
		</tr>
		<tr>
			<td>5</td>
			<td></td>
			<td></td>
			<td><input class='del' type="button" value="删除"><input class='del' type="button" value="修改"></td>
		</tr>
		<tr>
			<td>6</td>
			<td></td>
			<td></td>
			<td><input class='del' type="button" value="删除"><input class='del' type="button" value="修改"></td>
		</tr>
		<tr>
			<td>7</td>
			<td></td>
			<td></td>
			<td><input class='del' type="button" value="删除"><input class='del' type="button" value="修改"></td>
		</tr>
		<tr>
			<td>8</td>
			<td></td>
			<td></td>
			<td><input  class='del' type="button" value="删除"><input class='del' type="button" value="修改"></td>
		</tr>
		<tr>
			<td>9</td>
			<td></td>
			<td></td>
			<td><input class='del' type="button" value="删除"><input class='del' type="button" value="修改"></td>
		</tr>
	</table>
</body>
</html>